import { request } from '@/common/utils.js'
import store from '../store'

export function apiCheckToken(parm) {
    return request({
        url: store.state.domainUrl + '/api/userinfo/checkToken',
        method: 'post',
        data: parm
    })
}
export function apiLogin(parm) {
    return request({
        url: store.state.domainUrl + '/api/userinfo/login',
        method: 'post',
        data: parm
    })
}
export function apiLogout() {
    return request({
        url: store.state.domainUrl + '/api/userinfo/logout',
        method: 'post'
    })
}
export function apiRegist(parm) {
    return request({
        url: store.state.domainUrl + '/api/userinfo/regist',
        method: 'post',
        data: parm
    })
}
export function apiUpdateUserInfo(parm) {
    return request({
        url: store.state.domainUrl + '/api/userinfo/update',
        method: 'post',
        data: parm
    })
}
export function apiModifyPwd(parm) {
    return request({
        url: store.state.domainUrl + '/api/userinfo/modifyPwd',
        method: 'post',
        data: parm
    })
}
export function apiGetUserInfo() {
    return request({
        url: store.state.domainUrl + '/api/userinfo/getUserInfo',
        method: 'post'
    })
}
export function apiGetUserInfoAndWeekStatic() {
    return request({
        url: store.state.domainUrl + '/api/userinfo/getUserInfoAndWeekStatic',
        method: 'post'
    })
}
